using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using CasaBella.Repository.Mapping;
using CasaBella.Entities;

namespace CasaBella.Repository
{
    public partial class CASABELAContext : DbContext
    {
        static CASABELAContext()
        {
            Database.SetInitializer<CASABELAContext>
                (
                null
                //new DropCreateDatabaseIfModelChanges<CASABELAContext>()
                //new DropCreateDatabaseAlways<CASABELAContext>()
                //new CasaBellaDatabaseInitializer()
                );
        }

        public CASABELAContext()
            : base("Name=CASABELAContext")
        {
            this.Configuration.LazyLoadingEnabled = false;
            this.Configuration.ProxyCreationEnabled = false;
            this.Configuration.AutoDetectChangesEnabled = false;
        }

        public DbSet<CLIENTE> CLIENTEs { get; set; }
        public DbSet<CLIENTE_JURIDICO> CLIENTE_JURIDICO { get; set; }
        public DbSet<CLIENTE_NATURAL> CLIENTE_NATURAL { get; set; }
        public DbSet<COLOR> COLORs { get; set; }
        public DbSet<COMPRA> COMPRAs { get; set; }
        public DbSet<CREDITO> CREDITOes { get; set; }
        public DbSet<DETALLE_COMPRA> DETALLE_COMPRA { get; set; }
        public DbSet<DETALLE_PROFORMA> DETALLE_PROFORMA { get; set; }
        public DbSet<DETALLE_VENTA> DETALLE_VENTA { get; set; }
        public DbSet<ESTADO_CIVIL> ESTADO_CIVIL { get; set; }
        public DbSet<FOTO_TRABAJADOR> FOTO_TRABAJADOR { get; set; }
        //public DbSet<MARCA> MARCAs { get; set; }
        //public DbSet<MEDIDA> MEDIDAs { get; set; }
        public DbSet<MENU> MENUs { get; set; }
        //public DbSet<MODELO> MODELOes { get; set; }
        public DbSet<OPERADOR> OPERADORs { get; set; }
        public DbSet<P_BICICLETAS> P_BICICLETAS { get; set; }
        public DbSet<P_COLCHONES> P_COLCHONES { get; set; }
        public DbSet<P_MUEBLES> P_MUEBLES { get; set; }
        public DbSet<P_OTROS> P_OTROS { get; set; }
        public DbSet<PAGO> PAGOes { get; set; }
        public DbSet<PRODUCTO> PRODUCTOes { get; set; }
        public DbSet<PROFORMA> PROFORMAs { get; set; }
        public DbSet<PROVEEDOR> PROVEEDORs { get; set; }
        public DbSet<ROL> ROLs { get; set; }
        public DbSet<SEXO> SEXOes { get; set; }
        public DbSet<TELEFONOS_CLIENTE> TELEFONOS_CLIENTE { get; set; }
        public DbSet<TELEFONOS_PROVEEDOR> TELEFONOS_PROVEEDOR { get; set; }
        public DbSet<TELEFONOS_TRABAJADOR> TELEFONOS_TRABAJADOR { get; set; }
        public DbSet<TIPO_COMPROBANTE> TIPO_COMPROBANTE { get; set; }
        public DbSet<TRABAJADOR> TRABAJADORs { get; set; }
        public DbSet<USUARIO> USUARIOs { get; set; }
        public DbSet<USUARIO_MENU> USUARIO_MENU { get; set; }
        public DbSet<VENTA> VENTAs { get; set; }
        public DbSet<P_IMPORTADOS> P_IMPORTADOS { get; set; }
        public DbSet<MARCA_BICICLETA> MARCA_BICICLETAes { get; set; }
        public DbSet<MARCA_COLCHON> MARCA_COLCHONs { get; set; }
        public DbSet<MARCA_IMPORTADO> MARCA_IMPORTADOes { get; set; }
        public DbSet<MARCA_MUEBLE> MARCA_MUEBLEs { get; set; }
        public DbSet<MARCA_OTROS> MARCA_OTROS { get; set; }
        public DbSet<MODELO_BICICLETA> MODELO_BICICLETAes { get; set; }
        public DbSet<MODELO_COLCHON> MODELO_COLCHONs { get; set; }
        public DbSet<MODELO_IMPORTADO> MODELO_IMPORTADOes { get; set; }
        public DbSet<MODELO_MUEBLE> MODELO_MUEBLEs { get; set; }
        public DbSet<MODELO_OTROS> MODELO_OTROS { get; set; }
        public DbSet<MEDIDA_MUEBLE> MEDIDA_MUEBLEs { get; set; }
        public DbSet<MEDIDA_COLCHON> MEDIDA_COLCHONes { get; set; }
        public DbSet<MATERIAL> MATERIALs { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CLIENTEMap());
            modelBuilder.Configurations.Add(new CLIENTE_JURIDICOMap());
            modelBuilder.Configurations.Add(new CLIENTE_NATURALMap());
            modelBuilder.Configurations.Add(new COLORMap());
            modelBuilder.Configurations.Add(new COMPRAMap());
            modelBuilder.Configurations.Add(new CREDITOMap());
            modelBuilder.Configurations.Add(new DETALLE_COMPRAMap());
            modelBuilder.Configurations.Add(new DETALLE_PROFORMAMap());
            modelBuilder.Configurations.Add(new DETALLE_VENTAMap());
            modelBuilder.Configurations.Add(new ESTADO_CIVILMap());
            modelBuilder.Configurations.Add(new FOTO_TRABAJADORMap());
            //modelBuilder.Configurations.Add(new MARCAMap());
            //modelBuilder.Configurations.Add(new MEDIDAMap());
            modelBuilder.Configurations.Add(new MENUMap());
            //modelBuilder.Configurations.Add(new MODELOMap());
            modelBuilder.Configurations.Add(new OPERADORMap());
            modelBuilder.Configurations.Add(new P_BICICLETASMap());
            modelBuilder.Configurations.Add(new P_COLCHONESMap());
            modelBuilder.Configurations.Add(new P_MUEBLESMap());
            modelBuilder.Configurations.Add(new P_OTROSMap());
            modelBuilder.Configurations.Add(new PAGOMap());
            modelBuilder.Configurations.Add(new PRODUCTOMap());
            modelBuilder.Configurations.Add(new PROFORMAMap());
            modelBuilder.Configurations.Add(new PROVEEDORMap());
            modelBuilder.Configurations.Add(new ROLMap());
            modelBuilder.Configurations.Add(new SEXOMap());
            modelBuilder.Configurations.Add(new TELEFONOS_CLIENTEMap());
            modelBuilder.Configurations.Add(new TELEFONOS_PROVEEDORMap());
            modelBuilder.Configurations.Add(new TELEFONOS_TRABAJADORMap());
            modelBuilder.Configurations.Add(new TIPO_COMPROBANTEMap());
            modelBuilder.Configurations.Add(new TRABAJADORMap());
            modelBuilder.Configurations.Add(new USUARIOMap());
            modelBuilder.Configurations.Add(new USUARIO_MENUMap());
            modelBuilder.Configurations.Add(new VENTAMap());
            modelBuilder.Configurations.Add(new MATERIALMap());
            modelBuilder.Configurations.Add(new P_IMPORTADOSMap());
            modelBuilder.Configurations.Add(new MARCA_BICICLETAMap());
            modelBuilder.Configurations.Add(new MARCA_COLCHONMap());
            modelBuilder.Configurations.Add(new MARCA_IMPORTADOMap());
            modelBuilder.Configurations.Add(new MARCA_MUEBLEMap());
            modelBuilder.Configurations.Add(new MARCA_OTROSMap());
            modelBuilder.Configurations.Add(new MODELO_BICICLETAMap());
            modelBuilder.Configurations.Add(new MODELO_COLCHONMap());
            modelBuilder.Configurations.Add(new MODELO_IMPORTADOMap());
            modelBuilder.Configurations.Add(new MODELO_MUEBLEMap());
            modelBuilder.Configurations.Add(new MODELO_OTROSMap());
            modelBuilder.Configurations.Add(new MEDIDA_COLCHONMap());
            modelBuilder.Configurations.Add(new MEDIDA_MUEBLEMap());
        }
    }
}
